<?php
/**
 * helper.php
 *
 * @copyright 2018 opencart.cn
 *
 * All Rights Reserved
 * @link http://guangdawangluo.com
 *
 * @author StifferChen <chenlin@opencart.cn>
 * @created 2018-04-26 14:09
 * @modified 2018-04-26 14:09
 */

class Helper
{
    private static $instance = null;

    private function __construct()
    {
    }

    private function __clone()
    {
        // TODO: Implement __clone() method.
    }

    public static function getInstance()
    {
        if (!self::$instance instanceof self) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    public function __call($name, $arguments)
    {
        if (!function_exists($name)) {
            throw new Exception("function $name not found!");
        }
        return call_user_func($name, $arguments);
    }
}